import DIC from "@/const/cust/health/dic";
export default that => {
  return {
    submitText: "保存",
    emptyBtn: false,
    group: [
      {
        icon: "el-icon-info",
        label: "症状",
        prop: "group1",
        gutter: 30,
        column: [
          {
            label: "体检日期",
            labelWidth: 100,
            prop: "tjrq",
            type: "date",
            valueFormat: "yyyy-MM-dd",
            format: "yyyy-MM-dd",
            clearable: true,
            rules: []
          },
          {
            label: "责任医生",
            labelWidth: 100,
            type: "text",
            prop: "zrys",
            clearable: true
          },
          {
            label: "症状",
            labelWidth: 100,
            prop: "jcxmzz",
            type: "select",
            multiple: true,
            dataType: "string",
            span: 24,
            dicData: DIC.SYMPTOM,
            clearable: true,
            rules: [],
            defaultIndex: "1"
          },
          {
            label: "其他症状说明",
            labelWidth: 100,
            prop: "jcxmzzDes",
            type: "text",
            display: false,
            span: 24,
            clearable: true
          }
        ]
      },
      {
        icon: "el-icon-info",
        label: "一般状况(可同步项 选填)",
        prop: "group2",
        column: [
          {
            label: "体温℃",
            labelWidth: 200,
            prop: "ybzktw",
            type: "number",
            precision: 1, //精度
            clearable: true,
            step: 1
            // rules: [
            //   {
            //     required: true,
            //     // minlength: 1,
            //     message: '请填写体温'
            //   },
            //   {
            //     validator(rule, value, callback) {
            //       if (Number(value) > 0) {
            //         callback()
            //       } else {
            //         callback(new Error('请填写体温'))
            //       }
            //     }
            //   }
            // ]
          },
          {
            label: "脉搏（次/分钟）",
            labelWidth: 200,
            prop: "ybzkml",
            type: "number",
            precision: 0, //精度
            clearable: true
          },
          {
            label: "呼吸频率（次/分钟）",
            labelWidth: 200,
            prop: "ybzkhxpl",
            type: "number",
            precision: 0, //精度
            clearable: true
          },
          {
            label: "血压左侧舒张 mmHg",
            labelWidth: 200,
            prop: "ybzksxycc",
            type: "number",
            clearable: true,
            blur: function() {
              setTimeout(function() {
                if (
                  !that.validatenull(that.form.ybzksxycc) &&
                  Number(that.form.ybzksxycc) == 0
                ) {
                  that.$message({
                    message: "请检查血压左侧舒张是否正确",
                    type: "error",
                    duration: 3000
                  });
                }
              }, 100);
            }
          },
          {
            label: "血压右侧舒张 mmHg",
            labelWidth: 200,
            prop: "ybzksxyyc",
            type: "number",
            clearable: true
          },
          {
            label: "血压左侧 mmHg",
            labelWidth: 200,
            prop: "ybzkxycc",
            type: "number",
            clearable: true
          },
          {
            label: "血压右侧 mmHg",
            labelWidth: 200,
            prop: "ybzkxyyc",
            type: "number",
            clearable: true
          },
          {
            label: "身高cm",
            labelWidth: 200,
            prop: "ybzksg",
            type: "number",
            precision: 1, //精度
            clearable: true
          },
          {
            label: "体重kg",
            labelWidth: 200,
            prop: "ybzktz",
            type: "number",
            precision: 1, //精度
            clearable: true,
            blur: function() {
              setTimeout(function() {
                if (
                  !that.validatenull(that.form.ybzktz) &&
                  Number(that.form.ybzktz) <= 10
                ) {
                  that.$message({
                    message: "请检查体重是否正确",
                    type: "error",
                    duration: 3000
                  });
                }
              }, 100);
            }
          },
          {
            label: "腰围cm",
            labelWidth: 200,
            prop: "ybzkyw",
            type: "number",
            precision: 1, //精度
            clearable: true
          },
          {
            label: "体质指数Kg/m2",
            labelWidth: 200,
            prop: "ybzktzzs",
            type: "number",
            precision: 2, //精度
            span: 12,
            clearable: true
          },
          {
            label: "老年人健康状态自我评估",
            labelWidth: 200,
            prop: "lnrjkztzwpg",
            type: "select",
            dicData: DIC.JKZTZWPG,
            span: 12,
            clearable: true
          },
          {
            label: "老年人生活自理能力自我评估",
            labelWidth: 200,
            prop: "lnrshzlnlzwpg",
            type: "select",
            dicData: DIC.SHZLNLZWPG,
            span: 12,
            clearable: true
          },
          {
            label: "老年人认知功能",
            labelWidth: 200,
            prop: "lnrrzgn",
            type: "select",
            dicData: DIC.RZGN,
            span: 12,
            clearable: true
          },
          {
            label: "老年人情感状态",
            labelWidth: 200,
            prop: "lnrqgzt",
            type: "select",
            dicData: DIC.RZGN,
            span: 12,
            clearable: true
          }
        ]
      }
    ]
  };
};
